import BaseApi from '../BaseApi';

const controller = "/membershipAndCalls";

export default {

    getMembershipList(condition) {
        return this.requestGet(controller, "/getMembership", condition);
    },
    exportExcelMembership(condition) {
        return this.requestDownloadGet(controller, "/exportExcelMembership", condition);
    },
    getUrgeToPayList(condition) {
        return this.requestGet(controller, "/getUrgeToPay", condition);
    },
    exportExcelUrgeToPay(condition) {
        return this.requestDownloadGet(controller, "/exportExcelUrgeToPay", condition);
    },

    getUrgePDAToPayList(condition) {
        return this.requestPost(controller, "/getUrgePDAToPayList", condition);
    },
    exportExcelUrgePDAToPay(condition) {
        return this.requestDownloadGet(controller, "/exportExcelUrgePDAToPay", condition);
    },

    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },
    requestDownloadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    },
}